From: Jonas Dreßler Date: Tue, 16 Jan 2024 20:39:15 +0000 (+0100) Subject: overviewControls: Reduce spacing around the workspaces minimap X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~226^2^2~166 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=57d0691c3a7c86d4ae737787b5ac95d5b6de31ef;p=gnome-shell.git overviewControls: Reduce spacing around the workspaces minimap With a previous commit we've made the overall dynamic spacing dynamic, but the spacing is now a bit much when it comes to the space between search and workspaces minimap, just as workspaces minimap and large workspaces. The minimap should somewhat "squeeze into the empty space" here, so reduce the spacings above and below it a bit. Part-of: --- diff --git a/js/ui/overviewControls.js b/js/ui/overviewControls.js index 43817a862..0fc81d85c 100644 --- a/js/ui/overviewControls.js +++ b/js/ui/overviewControls.js @@ -22,6 +22,8 @@ import * as WorkspacesView from './workspacesView.js'; export const SMALL_WORKSPACE_RATIO = 0.15; const DASH_MAX_HEIGHT_RATIO = 0.15; const VERTICAL_SPACING_RATIO = 0.02; +const THUMBNAILS_SPACING_ADJUSTMENT_TOP = 0.6; +const THUMBNAILS_SPACING_ADJUSTMENT_BOTTOM = 0.4; const A11Y_SCHEMA = 'org.gnome.desktop.a11y.keyboard'; @@ -88,13 +90,13 @@ class ControlsManagerLayout extends Clutter.LayoutManager { break; case ControlsState.WINDOW_PICKER: workspaceBox.set_origin(0, - startY + searchHeight + spacing + - thumbnailsHeight + spacing * expandFraction); + startY + searchHeight + Math.round(spacing * THUMBNAILS_SPACING_ADJUSTMENT_TOP) + + thumbnailsHeight + Math.round(spacing * THUMBNAILS_SPACING_ADJUSTMENT_BOTTOM) * expandFraction); workspaceBox.set_size(width, height - dashHeight - spacing - - searchHeight - spacing - - thumbnailsHeight - spacing * expandFraction); + searchHeight - Math.round(spacing * THUMBNAILS_SPACING_ADJUSTMENT_TOP) - + thumbnailsHeight - Math.round(spacing * THUMBNAILS_SPACING_ADJUSTMENT_BOTTOM) * expandFraction); break; case ControlsState.APP_GRID: workspaceBox.set_origin(0, startY + searchHeight + spacing); @@ -188,7 +190,7 @@ class ControlsManagerLayout extends Clutter.LayoutManager { thumbnailsHeight = Math.min( thumbnailsHeight * expandFraction, height * this._workspacesThumbnails.maxThumbnailScale); - childBox.set_origin(0, startY + searchHeight + spacing); + childBox.set_origin(0, startY + searchHeight + Math.round(spacing * THUMBNAILS_SPACING_ADJUSTMENT_TOP)); childBox.set_size(width, thumbnailsHeight); this._workspacesThumbnails.allocate(childBox); }